<template>
  <div id="app">
    <div>
      <h1>vue2-webpack5-router3-mockjs-vuex3</h1>
      <el-button @click="goto('Vuex3')">Vuex3</el-button>
      <el-button @click="goto('Mockjs')">Mockjs</el-button>
      <el-button @click="goto('Echarts')">Echarts</el-button>
      <div style="border: 1px solid black">
        <router-view />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'app',
  data () {
    return {}
  },
  methods: {
    goto (v) {
      if (!this.$route.path.includes(v)) {
        this.$router.push('/' + v)
      }
    }
  }
}
</script>

<style lang="scss">
</style>
